package net.osweb.core.tools.utils.crm;

/**
 * Constant values used throughout the application.
 * 
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 */
public final class Constants {

	private Constants() {
		// hide me
	}

	// ~ Static fields/initializers
	// =============================================

	/**
	 * The name of the ResourceBundle used in this application
	 */
	public static final String BUNDLE_KEY = "ApplicationResources";

	/**
	 * File separator from System properties
	 */
	public static final String FILE_SEP = System.getProperty("file.separator");

	/**
	 * User home from System properties
	 */
	public static final String USER_HOME = System.getProperty("user.home")
			+ FILE_SEP;

	/**
	 * The name of the configuration hashmap stored in application scope.
	 */
	public static final String CONFIG = "appConfig";

	/**
	 * Session scope attribute that holds the locale set by the user. By setting
	 * this key to the same one that Struts uses, we get synchronization in
	 * Struts w/o having to do extra work or have two session-level variables.
	 */
	public static final String PREFERRED_LOCALE_KEY = "org.apache.struts2.action.LOCALE";
	
	public static final String DB_CATALOG = "blog";

	public static final String IS_DELETED_YES = "0";

	public static final String IS_DELETED_NO = "1";
	
	public static final int PAGE_START_DEFAULT = 0;
	public static final int PAGE_LIMIT_DEFAULT = 20;

	public static final String SORT_DESC = "DESC";

	public static final String SORT_ASC = "ASC";

	public static final String VOTE_LOGIN = "0";

	/**表示是否是相互关注-是*/
	public static final String MODEL_IS_FRIEND = "1";

	/**表示是否相互关注-否*/
	public static final String MODEL_IS_NOT_FRIEND = "0";

	/**Dto中的相互关注-是*/
	public static final boolean DTO_IS_FRIEND = true;

	/**Dto中的相互关注-否*/
	public static final boolean DTO_IS_NOT_FRIEND = false;

	
	/**表示是否已读-已读*/
	public static final String MODEL_IS_READ= "1";

	/**表示是否已读-未读*/
	public static final String MODEL_IS_NOT_READ= "0";
	
	
	public static final char DTO_MSG_IS_READ = '1';
	public static final char DTO_MSG_IS_NOT_READ  = '0';
	
	public static final boolean DTO_IS_READ = true;
	public static final boolean DTO_IS_NOT_READ  = false;
	
	/**表示是否已读-已读和未读*/
	public static final String READ_AND_UNREAD= "2";
	
	/**是否显示-是*/
	public static final String STRING_IS_SHOW= "1";
	public static final boolean BOOLEAN_IS_SHOW= true;
	
	/**是否显示-否*/
	public static final String STRING_IS_NOT_SHOW= "0";
	public static final boolean BOOLEAN_IS_NOT_SHOW= false;
	
	/**性别-男*/
	public static final String STRING_SEX_MALE= "1";
	public static final char CHAR_SEX_MALE= '1';
	
	/**性别-女*/
	public static final String STRING_SEX_FEMALE = "0";
	public static final char CHAR_SEX_FEMALE = '0';
	
	/**session中存放登录用户ID的Key*/
	public static final String SESSION_LOGIN_USER_KEY="LoginUser";
	
	/**用户隐私信息的默认显示状态- 不显示*/
	public static final boolean DEFAULT_SHOW_STATUS = BOOLEAN_IS_NOT_SHOW;
	
	/** 默认性别-男*/
	public static final char DEFAULT_SEX = CHAR_SEX_MALE;
	
	/** 登录次数初始值*/
	public static final int INIT_LOGIN_COUNT = 0;
	
	/** 标签表引导标签的父标签字段值*/
	public static final Long TAG_PARENT_ID = -1L;
		
	/** 性别*/
	public static final String DTO_GENDER_MALE = "1";
	public static final String DTO_GENDER_FEMALE = "0";
	public static final String DTO_GENDER_UNLIMIT = "2";
	public static final String MODEL_GENDER_MALE = "1";
	public static final String MODEL_GENDER_FEMALE = "0";
	
	/** 1天 单位：秒*/
	public static final Long ONE_DAY_SECOND = 24*60*60L;
	//返回码定义
	/** 操作成功 */
	public static final int CODE_SUCCESS = 1;
	/** 操作失败 */
	public static final int CODE_FAIL = 0;
	/** 用户不存在 */
	public static final int CODE_USER_NOT_EXISTS = 2;
	
	/**私信是否对发送者可见 1：不可见*/
	public static final String IS_SENDER_MSG_DEL = "1";
	/**私信是否对接收者可见 2：不可见*/
	public static final String IS_RECEIVER_MSG_DEL = "2";
	/**都可见*/
	public static final String SHOW_TO_ALL = "0";
	
	/**真名是否可见(可见)*/
	public static final String IS_VIEW_NAME_TRUE = "1";
	/**真名是否可见(不可见)*/
	public static final String IS_VIEW_NAME_FALSE = "0";
	
	/**是好友的好友*/
	public static final char IS_FRIENDS_FRIENDS = '1';
	/**是关注者的关注者*/
	public static final char IS_FOLLOWINGS_FOLLOWINGS = '0';
	
	/** JMS队列Dto类型 --- 新粉丝*/
	public static final int NOTIFY_QUEUE_TYPE_FOLLOWER = 1;
	
	/** JMS队列Dto类型 --- 新评论*/
	public static final int NOTIFY_QUEUE_TYPE_COMMENT = 2;
	
	/** JMS队列Dto类型 --- 新提到我的*/
	public static final int NOTIFY_QUEUE_TYPE_ATME = 3;
	
	/** JMS队列Dto类型 --- 新博文*/
	public static final int NOTIFY_QUEUE_TYPE_NEWSTATUS = 4;
	
	/** JMS队列Dto类型 --- 新私信*/
	public static final int NOTIFY_QUEUE_TYPE_MESSAGE = 5;
	
	/** JMS队列Dto类型 --- 新邀请*/
	public static final int NOTIFY_QUEUE_TYPE_INVITATIONS = 6;
	
	/**通知JMS队列Dto操作类型 --- 无操作*/
	public static final int NOTIFY_QUEUE_OPERATOR_NONE = 0;
	
	/**通知JMS队列Dto操作类型 --- +1*/
	public static final int NOTIFY_QUEUE_OPERATOR_ADD = 1;
	
	/**通知JMS队列Dto操作类型 --- 清0*/
	public static final int NOTIFY_QUEUE_OPERATOR_CLEAR = 2;
	
	/**通知数默认值 --- 0*/
	public static final int NOTIFY_DEFAULT_VALUE_0 = 0;
	
	/**是在读学校*/
	public static final String MODEL_IS_READING_SCHOOL = "1";
	/**不是在读学校*/
	public static final String MODEL_IS_NOT_READING_SCHOOL = "0";
	
	/**是在读学校*/
	public static final boolean DTO_IS_READING_SCHOOL = true;
	
	/**不是在读学校*/
	public static final boolean DTO_IS_NOT_READING_SCHOOL = false;
	
	/** 地区删除标记 已经删除 */
	public static final String MODEL_IS_DELETE = "1";
	
	/** 地区删除标记 未删除 */
	public static final String MODEL_IS_NOT_DELETE = "0";
	
	/** 地区删除标记 已经删除 */
	public static final boolean DTO_IS_DELETE = true;
	
	/** 地区删除标记 未删除 */
	public static final boolean DTO_IS_NOT_DELETE = false;
	
	/** 年龄 无限制*/
	public static final String AGE_UNLIMITED = "0";
	
	/** 处理状态 未处理 */
	public static final String MODEL_PROCESS_STATUS_NONE = "0";
	/**
	 *  TOP 10
	 */
	public static final int TOP = 10;
	/**
	 * 微博_类型
	 */
	public static final String WBLOG="0";
	/**
	 * 博文_类型
	 */
	public static final String BLOG="1";
	
	/**
	 * 第一个计数
	 */
	public static final int FIRST_COUNT = 1;
	
	/**
	 * 默认10页
	 */
	public static final int DEFAULT_PAGE = 10;
	
	/**
	 * 默认条数
	 */
	public static final int DEFAULT_NUM = 20;
	
	/**
	 * 文件大小5M
	 */
	public static final int FILE_SIZE_M_5 = 5*1024*1024;
	
	/**
	 * 状态：新增博文
	 */
	public static final String NEW_STATUSES = "1";
	/**
	 * 状态：删除博文
	 */
	public static final String DEL_STATUSES = "2";
	
	public static final String IMGTYPE = "jpg|gif|png";
	
	public static final String CONTAIN_TREND="1";
	public static final String UNCONTAIN_TREND="0";
	
	
	public static final Long VERSION = 1L;
	
	public static final Long TWENTY_FOUR_HOUR = 24L*60*60;
	
	public static final String REPOSTCOUNT="repost_count";
	public static final String COMMENTCOUNT="comment_count";
	public static final String FAVOURITECOUNT="favourite_count";
	
	public static final String OP_ADD = "1";
	public static final String OP_DELETE = "-1";
	
	/**
	 * 在访问人的微博客时<br>
	 * 头像，名称是不显示的<br>
	 */
	public static final Integer SHOW_MY_FACE = 1;
	public static final Integer FAVOURITE_PAGE = 1;
	public static final Integer SHOW_MY_COMMENT = 1;
	
	
	// ~ Static fields/initializers
	// =============================================
	/**
	 * JMS blog中的唯一标识
	 */
	public static final String CONSUMER_NAME_BLOG="blog";
	
	public static final String TREND_URL = "searchTrendshow.action?tid=";
	public static final String ATME_URL = "searchUser/findUsers.action?searchType=nickname&nickname=";
	
	
	public static final String ATME_BLOG = "1";
	public static final String ATME_COMMENT = "2";
	
}
